<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">
    <custom-input v-model="modelValue" @update:model-value="searchText= $event">

    </custom-input>

    <span>cur span:{{modelValue}}</span>
</div>

<script>
    const vueOpt = {
        data(){
            return {
                modelValue: ''
            }
        }
    }

    const app = Vue.createApp(vueOpt);

    app.component('custom-input', {
        data(){
            return {

            }
        },
        props: ['modelValue'],
        template: `
            <input :value="modelValue" @input="$emit('update:model-value', $event.target.value)">
        `
    })

    app.mount('#app')
</script>
</body>
</html>
